<template>
  <div>
    <h3>新闻列表</h3>
    <ul>
      <li>新闻1</li>
      <li>新闻2</li>
      <li>新闻3</li>
    </ul>
    <hr />
    <h3>{{ count }}</h3>
    <button @click="count++">+</button>
  </div>
</template>

<script>
export default {
  name:'news',
  data() {
    return {
      count: 1,
    };
  },
  beforeCreate() {
    console.log("1、新闻beforeCreate");
  },
  created() {
    console.log("2、新闻created");
  },
  beforeMount() {
    console.log("3、新闻beforeMount");
  },
  mounted() {
    console.log("4、新闻mounted");
  },
  beforeUpdate() {
    console.log("5、新闻beforeUpdate");
  },
  updated() {
    console.log("6、新闻update");
  },
  beforeDestroy() {
    console.log("7、新闻beforeDestroy");
    clearInterval(this.timer);
  },
  destroyed() {
    console.log("8、新闻destroyed");
  },
  activated(){
    console.log('新闻的activated');
  },
  deactivated(){
     console.log('新闻的deactivated');
  }
};
</script>

<style>
</style>